package com.asset.dispoal.extension.strategy.command;

import com.asset.dispoal.extension.domain.dto.RolePermissionDTO;
import com.asset.dispoal.extension.strategy.BaseDataPowerStrategyServer;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import tech.mhuang.pacebox.core.strategy.StrategyHandlerParam;
import tech.mhuang.pacebox.core.strategy.StrategyHandlerResult;

import java.util.Collections;
import java.util.List;

/**
 * 全部权限、则不校验
 *
 * @author mhuang
 * @since 1.0.0
 */
@Component
@Slf4j
public class AllDataPowerStrategyServer implements BaseDataPowerStrategyServer {

    @Override
    public StrategyHandlerResult<String> strategy(StrategyHandlerParam<RolePermissionDTO> strategyHandlerParam) {
        return new StrategyHandlerResult<>(true, null);
    }

    @Override
    public List<String> event() {
        return Collections.singletonList("0");
    }
}
